{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "01d7f979",
   "metadata": {},
   "source": [
    "# jupyter notebok 扩展\n",
    "\n",
    "https://zhuanlan.zhihu.com/p/97394628\n",
    "\n",
    "## 初识地图\n",
    "1. 地图API简介（Web服务）\n",
    "2. 如何选择合适的API（开发支持）\n",
    "3. 权衡经济成本和产品设计成本（调用量和并发量思考，经济成本考量）\n",
    "4. 设计地图url需求\n",
    "5. 测试API功能"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f065560c",
   "metadata": {},
   "source": [
    "# Web服务API简介\n",
    "* 高德Web服务API向开发者提供HTTP接口，开发者可通过这些接口使用各类型的地理数据服务，返回结果支持JSON和XML格式。Web服务API对所有用户开放。使用本组服务之前，需要申请应用Key。不同类型用户可获取不同的数据访问能力。\n",
    "## 地理/逆地理编码\n",
    "\n",
    "* 结构化地址:\n",
    "> 首先，地址肯定是一串字符，内含国家、省份、城市、区县、城镇、乡村、街道、门牌号码、屋邨、大厦等建筑物名称。按照由大区域名称到小区域名称组合在一起的字符。一个有效的地址应该是独一无二的。注意：针对大陆、港、澳地区的地理编码转换时可以将国家信息选择性的忽略，但省、市、城镇等级别的地址构成是不能忽略的。暂时不支持返回台湾省的详细地址信息。\n",
    "\n",
    "* 结构化地址<--->经纬度\n",
    "> 地理编码/逆地理编码 API 是通过 HTTP/HTTPS 协议访问远程服务的接口，提供结构化地址与经纬度之间的相互转化的能力"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "336b0544",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 1. 调用requests模块（google chrome 浏览器）\n",
    "import requests\n",
    "# 2. 请求方法 ： GET\n",
    "# 3. URL地址 ： https://restapi.amap.com/v3/geocode/geo?parameters\n",
    "geo_url = \"https://restapi.amap.com/v3/geocode/geo?parameters\"\n",
    "# 4. 准备参数，用于交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"b62e5f7e5a9cb781d9cbd200190b6df8\",\n",
    "    \"address\":\"广东省广州市从化区广州南方学院\"\n",
    "}\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=geo_url, params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "714d949c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "7c866dec",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'geocodes': [{'formatted_address': '广东省广州市从化区温泉镇中心大学南方学院',\n",
       "   'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'citycode': '020',\n",
       "   'city': '广州市',\n",
       "   'district': '从化区',\n",
       "   'township': [],\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'adcode': '440117',\n",
       "   'street': [],\n",
       "   'number': [],\n",
       "   'location': '113.678280,23.628439',\n",
       "   'level': '兴趣点'}]}"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "01c8b74c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.678280,23.628439'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "广州南方学院_location = r.json()['geocodes'][0]['location']\n",
    "广州南方学院_location"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a04ca8f9",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "7598f100",
   "metadata": {},
   "source": [
    "## 逆地理编码"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "114c96c8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# extensions=base（默认）\n",
    "# 1. 调用requests模块（google chrome 浏览器）\n",
    "import requests\n",
    "# 2. 请求方法 ： GET\n",
    "# 3. URL地址 ： https://restapi.amap.com/v3/geocode/geo?parameters\n",
    "regeo_url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "# 4. 准备参数，用于交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"b62e5f7e5a9cb781d9cbd200190b6df8\",\n",
    "    \"location\":广州南方学院_location\n",
    "}\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=regeo_url, params=payload)    \n",
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "4e92c45f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "496d866a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'regeocode': {'addressComponent': {'city': '广州市',\n",
       "   'province': '广东省',\n",
       "   'adcode': '440117',\n",
       "   'district': '从化区',\n",
       "   'towncode': '440117100000',\n",
       "   'streetNumber': {'number': '24号',\n",
       "    'location': '113.677267,23.629149',\n",
       "    'direction': '西北',\n",
       "    'distance': '129.943',\n",
       "    'street': '博学路'},\n",
       "   'country': '中国',\n",
       "   'township': '温泉镇',\n",
       "   'businessAreas': [[]],\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'citycode': '020'},\n",
       "  'formatted_address': '广东省广州市从化区温泉镇博学路广州南方学院'},\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000'}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "dcb5dbfa",
   "metadata": {},
   "outputs": [],
   "source": [
    "# extensions=all \n",
    "# 1. 调用requests模块（google chrome 浏览器）\n",
    "import requests\n",
    "# 2. 请求方法 ： GET\n",
    "# 3. URL地址 ： https://restapi.amap.com/v3/geocode/geo?parameters\n",
    "regeo_url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "# 4. 准备参数，用于交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"b62e5f7e5a9cb781d9cbd200190b6df8\",\n",
    "    \"location\":广州南方学院_location,\n",
    "    \"extensions\":\"all\", # 返回的信息设置为可以选择的全部信息\n",
    "    \"poitype\":\"true\", # 开启附近搜索poi1\n",
    "    \n",
    "    \n",
    "}\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=regeo_url, params=payload) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "b116723d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "d95c471e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'regeocode': {'formatted_address': '广东省广州市从化区温泉镇博学路广州南方学院',\n",
       "  'addressComponent': {'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'city': '广州市',\n",
       "   'citycode': '020',\n",
       "   'district': '从化区',\n",
       "   'adcode': '440117',\n",
       "   'township': '温泉镇',\n",
       "   'towncode': '440117100000',\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'streetNumber': {'street': '博学路',\n",
       "    'number': '24号',\n",
       "    'location': '113.677267,23.629149',\n",
       "    'direction': '西北',\n",
       "    'distance': '129.943'},\n",
       "   'businessAreas': [[]]},\n",
       "  'pois': [{'id': 'B00140MR9A',\n",
       "    'name': '广州南方学院',\n",
       "    'type': '科教文化服务;学校;高等院校',\n",
       "    'tel': '020-87828988;020-61787331',\n",
       "    'direction': '北',\n",
       "    'distance': '470.792',\n",
       "    'location': '113.679257,23.632577',\n",
       "    'address': '温泉大道882号',\n",
       "    'poiweight': '0.450402',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFG4TAF2',\n",
       "    'name': '广州南方公寓',\n",
       "    'type': '商务住宅;商务住宅相关;商务住宅相关',\n",
       "    'tel': '13622768437',\n",
       "    'direction': '东南',\n",
       "    'distance': '102.617',\n",
       "    'location': '113.678983,23.627778',\n",
       "    'address': '温泉镇乌土村松浪队5号(近博学路)',\n",
       "    'poiweight': '0.237309',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0H6FA18J5',\n",
       "    'name': '保利半山花园',\n",
       "    'type': '商务住宅;住宅区;住宅区',\n",
       "    'tel': [],\n",
       "    'direction': '东南',\n",
       "    'distance': '139.054',\n",
       "    'location': '113.679358,23.627672',\n",
       "    'address': '从莞深高速(广州南方学院南侧)',\n",
       "    'poiweight': '0.223065',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B00140TWHT',\n",
       "    'name': '教工住宅1号',\n",
       "    'type': '商务住宅;住宅区;住宅小区',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '222.658',\n",
       "    'location': '113.678490,23.630432',\n",
       "    'address': '笃行路2',\n",
       "    'poiweight': '0.157653',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFHRJDM9',\n",
       "    'name': '中南公寓',\n",
       "    'type': '商务住宅;住宅区;住宅小区',\n",
       "    'tel': '13711245345',\n",
       "    'direction': '东南',\n",
       "    'distance': '231.223',\n",
       "    'location': '113.680340,23.627566',\n",
       "    'address': '中大南方学院南门1号',\n",
       "    'poiweight': '0.256152',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD588HJ',\n",
       "    'name': '广州南方学院教学楼4号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '242.901',\n",
       "    'location': '113.677460,23.630490',\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFHZH0IK',\n",
       "    'name': '地下铁',\n",
       "    'type': '餐饮服务;冷饮店;冷饮店',\n",
       "    'tel': [],\n",
       "    'direction': '西北',\n",
       "    'distance': '74.1376',\n",
       "    'location': '113.677941,23.629029',\n",
       "    'address': '博学路广州南方学院综合楼内',\n",
       "    'poiweight': '0.17934',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU76L2',\n",
       "    'name': '广州南方学院2号实验楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '280.003',\n",
       "    'location': '113.678211,23.630956',\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKP838K',\n",
       "    'name': '教学楼3号(外国语学院)',\n",
       "    'type': '科教文化服务;学校;高等院校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '298.093',\n",
       "    'location': '113.677247,23.630947',\n",
       "    'address': '博学路25',\n",
       "    'poiweight': '0.191742',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKSF1FI',\n",
       "    'name': '香辣螺蛳粉',\n",
       "    'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "    'tel': '17820061022',\n",
       "    'direction': '西',\n",
       "    'distance': '209.206',\n",
       "    'location': '113.676231,23.628565',\n",
       "    'address': '广州南方学院西4123',\n",
       "    'poiweight': '0.209252',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU8NLD',\n",
       "    'name': '广州南方学院1号实验楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '326.007',\n",
       "    'location': '113.678215,23.631370',\n",
       "    'address': '博学路附近',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFLF90I2',\n",
       "    'name': '煌上煌酱鸭(南方学院店)',\n",
       "    'type': '餐饮服务;快餐厅;快餐厅',\n",
       "    'tel': '13712317721',\n",
       "    'direction': '东北',\n",
       "    'distance': '256.772',\n",
       "    'location': '113.679965,23.630156',\n",
       "    'address': '笃行路20、22、24号广州南方学院商业中心1层1F015',\n",
       "    'poiweight': '0.209448',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD58UTU',\n",
       "    'name': '广州南方学院2号教学楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '西北',\n",
       "    'distance': '346.352',\n",
       "    'location': '113.677060,23.631346',\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.191229',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0H25SMRKP',\n",
       "    'name': '广州南方学院大礼堂',\n",
       "    'type': '科教文化服务;会展中心;会展中心',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '386.65',\n",
       "    'location': '113.680076,23.631502',\n",
       "    'address': '温泉大道882号',\n",
       "    'poiweight': '0.261624',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU92JD',\n",
       "    'name': '广州南方学院教学楼1号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '391.548',\n",
       "    'location': '113.677077,23.631783',\n",
       "    'address': '博学路19号',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD592BJ',\n",
       "    'name': '广州南方学院综合楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '392.731',\n",
       "    'location': '113.680117,23.631544',\n",
       "    'address': '温泉大道886号广州南方学院内',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKP81F0',\n",
       "    'name': '教学楼1号(文学与传媒学院)',\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所',\n",
       "    'tel': [],\n",
       "    'direction': '西北',\n",
       "    'distance': '393.93',\n",
       "    'location': '113.676866,23.631736',\n",
       "    'address': '博学路19号附近',\n",
       "    'poiweight': '0.191742',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFLBEOND',\n",
       "    'name': '聚贤楼10号',\n",
       "    'type': '商务住宅;住宅区;宿舍',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '418.51',\n",
       "    'location': '113.681253,23.631036',\n",
       "    'address': '从莞深高速(广州南方学院)',\n",
       "    'poiweight': '0.190963',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFH6K3U9',\n",
       "    'name': '广州中大南方招待所',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关',\n",
       "    'tel': '020-61787222',\n",
       "    'direction': '西北',\n",
       "    'distance': '378.102',\n",
       "    'location': '113.676330,23.631332',\n",
       "    'address': '温泉镇温泉大道882号广州南方学院H7栋1-5层',\n",
       "    'poiweight': '0.254885',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD58NF8',\n",
       "    'name': '广州南方学院达人书院',\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '446.366',\n",
       "    'location': '113.679041,23.632392',\n",
       "    'address': '温泉大道882号广州南方学院新综合楼2层',\n",
       "    'poiweight': '0.191229',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKUVYWV',\n",
       "    'name': '广州和风庭阿七度假别墅',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '424.35',\n",
       "    'location': '113.681736,23.630569',\n",
       "    'address': '保利桃花源',\n",
       "    'poiweight': '0.273168',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU99RM',\n",
       "    'name': '广州南方学院图书馆',\n",
       "    'type': '科教文化服务;图书馆;图书馆',\n",
       "    'tel': '020-61787368;020-61787371',\n",
       "    'direction': '北',\n",
       "    'distance': '489.331',\n",
       "    'location': '113.679177,23.632762',\n",
       "    'address': '温泉大道882号广州南方学院内',\n",
       "    'poiweight': '0.257947',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU92JC',\n",
       "    'name': '广州南方学院4号实验楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '498.883',\n",
       "    'location': '113.679963,23.632652',\n",
       "    'address': '博学路附近',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFL7C054',\n",
       "    'name': '广州U优森特酒店',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关',\n",
       "    'tel': '15813395296',\n",
       "    'direction': '北',\n",
       "    'distance': '464.819',\n",
       "    'location': '113.679226,23.632528',\n",
       "    'address': '温泉镇博学路882号(广州南方学院商业中心1层)',\n",
       "    'poiweight': '0.317505',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFG8CSEK',\n",
       "    'name': 'L5员工宿舍',\n",
       "    'type': '商务住宅;住宅区;宿舍',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '554.129',\n",
       "    'location': '113.682583,23.631487',\n",
       "    'address': '从莞深高速(广州南方学院)',\n",
       "    'poiweight': '0.185371',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD58FR2',\n",
       "    'name': '广州南方学院教学楼9号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '532.163',\n",
       "    'location': '113.679747,23.633032',\n",
       "    'address': '广州南方学院',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HG5Z9JNK',\n",
       "    'name': '广州南方学院教学楼7号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '544.868',\n",
       "    'location': '113.678600,23.633330',\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.221553',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD599JM',\n",
       "    'name': '广州南方学院第11教学楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '556.036',\n",
       "    'location': '113.680037,23.633173',\n",
       "    'address': '温泉大道882号广州南方学院',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0GUJYPEG2',\n",
       "    'name': '怒烤烤串(从化店)',\n",
       "    'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '510.112',\n",
       "    'location': '113.677160,23.632910',\n",
       "    'address': '温泉大道882号广州南方学院内博学路6号之3',\n",
       "    'poiweight': '0.216026',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU6Z41',\n",
       "    'name': '广州南方学院教学楼6号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '586.331',\n",
       "    'location': '113.678424,23.633710',\n",
       "    'address': '温泉大道882',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []}],\n",
       "  'roads': [{'id': '020F49F0050461206',\n",
       "    'name': '博学路',\n",
       "    'direction': '北',\n",
       "    'distance': '7.63232',\n",
       "    'location': '113.678,23.6284'},\n",
       "   {'id': '020F49F0050462229',\n",
       "    'name': '老虎形街',\n",
       "    'direction': '北',\n",
       "    'distance': '445.159',\n",
       "    'location': '113.679,23.6245'},\n",
       "   {'id': '020F49F0050462451',\n",
       "    'name': '中山路',\n",
       "    'direction': '南',\n",
       "    'distance': '708.299',\n",
       "    'location': '113.677,23.6347'}],\n",
       "  'roadinters': [{'direction': '南',\n",
       "    'distance': '708.299',\n",
       "    'location': '113.676794,23.634661',\n",
       "    'first_id': '020F49F0050461206',\n",
       "    'first_name': '博学路',\n",
       "    'second_id': '020F49F0050462451',\n",
       "    'second_name': '中山路'}],\n",
       "  'aois': [{'id': 'B00140MR9A',\n",
       "    'name': '广州南方学院',\n",
       "    'adcode': '440117',\n",
       "    'location': '113.679257,23.632577',\n",
       "    'area': '528560.656426',\n",
       "    'distance': '0',\n",
       "    'type': '141201'}]}}"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "bf9affc7",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "a2272ad1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>tel</th>\n",
       "      <th>direction</th>\n",
       "      <th>distance</th>\n",
       "      <th>location</th>\n",
       "      <th>address</th>\n",
       "      <th>poiweight</th>\n",
       "      <th>businessarea</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>B00140MR9A</td>\n",
       "      <td>广州南方学院</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>020-87828988;020-61787331</td>\n",
       "      <td>北</td>\n",
       "      <td>470.792</td>\n",
       "      <td>113.679257,23.632577</td>\n",
       "      <td>温泉大道882号</td>\n",
       "      <td>0.450402</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>B0FFG4TAF2</td>\n",
       "      <td>广州南方公寓</td>\n",
       "      <td>商务住宅;商务住宅相关;商务住宅相关</td>\n",
       "      <td>13622768437</td>\n",
       "      <td>东南</td>\n",
       "      <td>102.617</td>\n",
       "      <td>113.678983,23.627778</td>\n",
       "      <td>温泉镇乌土村松浪队5号(近博学路)</td>\n",
       "      <td>0.237309</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>B0H6FA18J5</td>\n",
       "      <td>保利半山花园</td>\n",
       "      <td>商务住宅;住宅区;住宅区</td>\n",
       "      <td>[]</td>\n",
       "      <td>东南</td>\n",
       "      <td>139.054</td>\n",
       "      <td>113.679358,23.627672</td>\n",
       "      <td>从莞深高速(广州南方学院南侧)</td>\n",
       "      <td>0.223065</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>B00140TWHT</td>\n",
       "      <td>教工住宅1号</td>\n",
       "      <td>商务住宅;住宅区;住宅小区</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>222.658</td>\n",
       "      <td>113.678490,23.630432</td>\n",
       "      <td>笃行路2</td>\n",
       "      <td>0.157653</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>B0FFHRJDM9</td>\n",
       "      <td>中南公寓</td>\n",
       "      <td>商务住宅;住宅区;住宅小区</td>\n",
       "      <td>13711245345</td>\n",
       "      <td>东南</td>\n",
       "      <td>231.223</td>\n",
       "      <td>113.680340,23.627566</td>\n",
       "      <td>中大南方学院南门1号</td>\n",
       "      <td>0.256152</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>B0HGD588HJ</td>\n",
       "      <td>广州南方学院教学楼4号</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>242.901</td>\n",
       "      <td>113.677460,23.630490</td>\n",
       "      <td>博学路</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>B0FFHZH0IK</td>\n",
       "      <td>地下铁</td>\n",
       "      <td>餐饮服务;冷饮店;冷饮店</td>\n",
       "      <td>[]</td>\n",
       "      <td>西北</td>\n",
       "      <td>74.1376</td>\n",
       "      <td>113.677941,23.629029</td>\n",
       "      <td>博学路广州南方学院综合楼内</td>\n",
       "      <td>0.17934</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>B0HGDU76L2</td>\n",
       "      <td>广州南方学院2号实验楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>280.003</td>\n",
       "      <td>113.678211,23.630956</td>\n",
       "      <td>博学路</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>B0FFKP838K</td>\n",
       "      <td>教学楼3号(外国语学院)</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>298.093</td>\n",
       "      <td>113.677247,23.630947</td>\n",
       "      <td>博学路25</td>\n",
       "      <td>0.191742</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>B0FFKSF1FI</td>\n",
       "      <td>香辣螺蛳粉</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>17820061022</td>\n",
       "      <td>西</td>\n",
       "      <td>209.206</td>\n",
       "      <td>113.676231,23.628565</td>\n",
       "      <td>广州南方学院西4123</td>\n",
       "      <td>0.209252</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B0HGDU8NLD</td>\n",
       "      <td>广州南方学院1号实验楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>326.007</td>\n",
       "      <td>113.678215,23.631370</td>\n",
       "      <td>博学路附近</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>B0FFLF90I2</td>\n",
       "      <td>煌上煌酱鸭(南方学院店)</td>\n",
       "      <td>餐饮服务;快餐厅;快餐厅</td>\n",
       "      <td>13712317721</td>\n",
       "      <td>东北</td>\n",
       "      <td>256.772</td>\n",
       "      <td>113.679965,23.630156</td>\n",
       "      <td>笃行路20、22、24号广州南方学院商业中心1层1F015</td>\n",
       "      <td>0.209448</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>B0HGD58UTU</td>\n",
       "      <td>广州南方学院2号教学楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>西北</td>\n",
       "      <td>346.352</td>\n",
       "      <td>113.677060,23.631346</td>\n",
       "      <td>博学路</td>\n",
       "      <td>0.191229</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>B0H25SMRKP</td>\n",
       "      <td>广州南方学院大礼堂</td>\n",
       "      <td>科教文化服务;会展中心;会展中心</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>386.65</td>\n",
       "      <td>113.680076,23.631502</td>\n",
       "      <td>温泉大道882号</td>\n",
       "      <td>0.261624</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>B0HGDU92JD</td>\n",
       "      <td>广州南方学院教学楼1号</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>391.548</td>\n",
       "      <td>113.677077,23.631783</td>\n",
       "      <td>博学路19号</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>B0HGD592BJ</td>\n",
       "      <td>广州南方学院综合楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>392.731</td>\n",
       "      <td>113.680117,23.631544</td>\n",
       "      <td>温泉大道886号广州南方学院内</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>B0FFKP81F0</td>\n",
       "      <td>教学楼1号(文学与传媒学院)</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "      <td>[]</td>\n",
       "      <td>西北</td>\n",
       "      <td>393.93</td>\n",
       "      <td>113.676866,23.631736</td>\n",
       "      <td>博学路19号附近</td>\n",
       "      <td>0.191742</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>B0FFLBEOND</td>\n",
       "      <td>聚贤楼10号</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>418.51</td>\n",
       "      <td>113.681253,23.631036</td>\n",
       "      <td>从莞深高速(广州南方学院)</td>\n",
       "      <td>0.190963</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>B0FFH6K3U9</td>\n",
       "      <td>广州中大南方招待所</td>\n",
       "      <td>住宿服务;住宿服务相关;住宿服务相关</td>\n",
       "      <td>020-61787222</td>\n",
       "      <td>西北</td>\n",
       "      <td>378.102</td>\n",
       "      <td>113.676330,23.631332</td>\n",
       "      <td>温泉镇温泉大道882号广州南方学院H7栋1-5层</td>\n",
       "      <td>0.254885</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>B0HGD58NF8</td>\n",
       "      <td>广州南方学院达人书院</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>446.366</td>\n",
       "      <td>113.679041,23.632392</td>\n",
       "      <td>温泉大道882号广州南方学院新综合楼2层</td>\n",
       "      <td>0.191229</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>B0FFKUVYWV</td>\n",
       "      <td>广州和风庭阿七度假别墅</td>\n",
       "      <td>住宿服务;住宿服务相关;住宿服务相关</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>424.35</td>\n",
       "      <td>113.681736,23.630569</td>\n",
       "      <td>保利桃花源</td>\n",
       "      <td>0.273168</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>B0HGDU99RM</td>\n",
       "      <td>广州南方学院图书馆</td>\n",
       "      <td>科教文化服务;图书馆;图书馆</td>\n",
       "      <td>020-61787368;020-61787371</td>\n",
       "      <td>北</td>\n",
       "      <td>489.331</td>\n",
       "      <td>113.679177,23.632762</td>\n",
       "      <td>温泉大道882号广州南方学院内</td>\n",
       "      <td>0.257947</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>B0HGDU92JC</td>\n",
       "      <td>广州南方学院4号实验楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>498.883</td>\n",
       "      <td>113.679963,23.632652</td>\n",
       "      <td>博学路附近</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>B0FFL7C054</td>\n",
       "      <td>广州U优森特酒店</td>\n",
       "      <td>住宿服务;住宿服务相关;住宿服务相关</td>\n",
       "      <td>15813395296</td>\n",
       "      <td>北</td>\n",
       "      <td>464.819</td>\n",
       "      <td>113.679226,23.632528</td>\n",
       "      <td>温泉镇博学路882号(广州南方学院商业中心1层)</td>\n",
       "      <td>0.317505</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>B0FFG8CSEK</td>\n",
       "      <td>L5员工宿舍</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>[]</td>\n",
       "      <td>东北</td>\n",
       "      <td>554.129</td>\n",
       "      <td>113.682583,23.631487</td>\n",
       "      <td>从莞深高速(广州南方学院)</td>\n",
       "      <td>0.185371</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>B0HGD58FR2</td>\n",
       "      <td>广州南方学院教学楼9号</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>532.163</td>\n",
       "      <td>113.679747,23.633032</td>\n",
       "      <td>广州南方学院</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>B0HG5Z9JNK</td>\n",
       "      <td>广州南方学院教学楼7号</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>544.868</td>\n",
       "      <td>113.678600,23.633330</td>\n",
       "      <td>博学路</td>\n",
       "      <td>0.221553</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>B0HGD599JM</td>\n",
       "      <td>广州南方学院第11教学楼</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>556.036</td>\n",
       "      <td>113.680037,23.633173</td>\n",
       "      <td>温泉大道882号广州南方学院</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>B0GUJYPEG2</td>\n",
       "      <td>怒烤烤串(从化店)</td>\n",
       "      <td>餐饮服务;中餐厅;特色/地方风味餐厅</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>510.112</td>\n",
       "      <td>113.677160,23.632910</td>\n",
       "      <td>温泉大道882号广州南方学院内博学路6号之3</td>\n",
       "      <td>0.216026</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>B0HGDU6Z41</td>\n",
       "      <td>广州南方学院教学楼6号</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>[]</td>\n",
       "      <td>北</td>\n",
       "      <td>586.331</td>\n",
       "      <td>113.678424,23.633710</td>\n",
       "      <td>温泉大道882</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            id            name                  type  \\\n",
       "0   B00140MR9A          广州南方学院        科教文化服务;学校;高等院校   \n",
       "1   B0FFG4TAF2          广州南方公寓    商务住宅;商务住宅相关;商务住宅相关   \n",
       "2   B0H6FA18J5          保利半山花园          商务住宅;住宅区;住宅区   \n",
       "3   B00140TWHT          教工住宅1号         商务住宅;住宅区;住宅小区   \n",
       "4   B0FFHRJDM9            中南公寓         商务住宅;住宅区;住宅小区   \n",
       "5   B0HGD588HJ     广州南方学院教学楼4号          科教文化服务;学校;学校   \n",
       "6   B0FFHZH0IK             地下铁          餐饮服务;冷饮店;冷饮店   \n",
       "7   B0HGDU76L2     广州南方学院2号实验楼          科教文化服务;学校;学校   \n",
       "8   B0FFKP838K    教学楼3号(外国语学院)        科教文化服务;学校;高等院校   \n",
       "9   B0FFKSF1FI           香辣螺蛳粉      餐饮服务;餐饮相关场所;餐饮相关   \n",
       "10  B0HGDU8NLD     广州南方学院1号实验楼          科教文化服务;学校;学校   \n",
       "11  B0FFLF90I2    煌上煌酱鸭(南方学院店)          餐饮服务;快餐厅;快餐厅   \n",
       "12  B0HGD58UTU     广州南方学院2号教学楼          科教文化服务;学校;学校   \n",
       "13  B0H25SMRKP       广州南方学院大礼堂      科教文化服务;会展中心;会展中心   \n",
       "14  B0HGDU92JD     广州南方学院教学楼1号          科教文化服务;学校;学校   \n",
       "15  B0HGD592BJ       广州南方学院综合楼          科教文化服务;学校;学校   \n",
       "16  B0FFKP81F0  教学楼1号(文学与传媒学院)  科教文化服务;科教文化场所;科教文化场所   \n",
       "17  B0FFLBEOND          聚贤楼10号           商务住宅;住宅区;宿舍   \n",
       "18  B0FFH6K3U9       广州中大南方招待所    住宿服务;住宿服务相关;住宿服务相关   \n",
       "19  B0HGD58NF8      广州南方学院达人书院  科教文化服务;科教文化场所;科教文化场所   \n",
       "20  B0FFKUVYWV     广州和风庭阿七度假别墅    住宿服务;住宿服务相关;住宿服务相关   \n",
       "21  B0HGDU99RM       广州南方学院图书馆        科教文化服务;图书馆;图书馆   \n",
       "22  B0HGDU92JC     广州南方学院4号实验楼          科教文化服务;学校;学校   \n",
       "23  B0FFL7C054        广州U优森特酒店    住宿服务;住宿服务相关;住宿服务相关   \n",
       "24  B0FFG8CSEK          L5员工宿舍           商务住宅;住宅区;宿舍   \n",
       "25  B0HGD58FR2     广州南方学院教学楼9号          科教文化服务;学校;学校   \n",
       "26  B0HG5Z9JNK     广州南方学院教学楼7号          科教文化服务;学校;学校   \n",
       "27  B0HGD599JM    广州南方学院第11教学楼          科教文化服务;学校;学校   \n",
       "28  B0GUJYPEG2       怒烤烤串(从化店)    餐饮服务;中餐厅;特色/地方风味餐厅   \n",
       "29  B0HGDU6Z41     广州南方学院教学楼6号          科教文化服务;学校;学校   \n",
       "\n",
       "                          tel direction distance              location  \\\n",
       "0   020-87828988;020-61787331         北  470.792  113.679257,23.632577   \n",
       "1                 13622768437        东南  102.617  113.678983,23.627778   \n",
       "2                          []        东南  139.054  113.679358,23.627672   \n",
       "3                          []         北  222.658  113.678490,23.630432   \n",
       "4                 13711245345        东南  231.223  113.680340,23.627566   \n",
       "5                          []         北  242.901  113.677460,23.630490   \n",
       "6                          []        西北  74.1376  113.677941,23.629029   \n",
       "7                          []         北  280.003  113.678211,23.630956   \n",
       "8                          []         北  298.093  113.677247,23.630947   \n",
       "9                 17820061022         西  209.206  113.676231,23.628565   \n",
       "10                         []         北  326.007  113.678215,23.631370   \n",
       "11                13712317721        东北  256.772  113.679965,23.630156   \n",
       "12                         []        西北  346.352  113.677060,23.631346   \n",
       "13                         []        东北   386.65  113.680076,23.631502   \n",
       "14                         []         北  391.548  113.677077,23.631783   \n",
       "15                         []        东北  392.731  113.680117,23.631544   \n",
       "16                         []        西北   393.93  113.676866,23.631736   \n",
       "17                         []        东北   418.51  113.681253,23.631036   \n",
       "18               020-61787222        西北  378.102  113.676330,23.631332   \n",
       "19                         []         北  446.366  113.679041,23.632392   \n",
       "20                         []        东北   424.35  113.681736,23.630569   \n",
       "21  020-61787368;020-61787371         北  489.331  113.679177,23.632762   \n",
       "22                         []         北  498.883  113.679963,23.632652   \n",
       "23                15813395296         北  464.819  113.679226,23.632528   \n",
       "24                         []        东北  554.129  113.682583,23.631487   \n",
       "25                         []         北  532.163  113.679747,23.633032   \n",
       "26                         []         北  544.868  113.678600,23.633330   \n",
       "27                         []         北  556.036  113.680037,23.633173   \n",
       "28                         []         北  510.112  113.677160,23.632910   \n",
       "29                         []         北  586.331  113.678424,23.633710   \n",
       "\n",
       "                          address poiweight businessarea  \n",
       "0                        温泉大道882号  0.450402           []  \n",
       "1               温泉镇乌土村松浪队5号(近博学路)  0.237309           []  \n",
       "2                 从莞深高速(广州南方学院南侧)  0.223065           []  \n",
       "3                            笃行路2  0.157653           []  \n",
       "4                      中大南方学院南门1号  0.256152           []  \n",
       "5                             博学路  0.221662           []  \n",
       "6                   博学路广州南方学院综合楼内   0.17934           []  \n",
       "7                             博学路  0.221662           []  \n",
       "8                           博学路25  0.191742           []  \n",
       "9                     广州南方学院西4123  0.209252           []  \n",
       "10                          博学路附近  0.221662           []  \n",
       "11  笃行路20、22、24号广州南方学院商业中心1层1F015  0.209448           []  \n",
       "12                            博学路  0.191229           []  \n",
       "13                       温泉大道882号  0.261624           []  \n",
       "14                         博学路19号  0.221662           []  \n",
       "15                温泉大道886号广州南方学院内  0.221662           []  \n",
       "16                       博学路19号附近  0.191742           []  \n",
       "17                  从莞深高速(广州南方学院)  0.190963           []  \n",
       "18       温泉镇温泉大道882号广州南方学院H7栋1-5层  0.254885           []  \n",
       "19           温泉大道882号广州南方学院新综合楼2层  0.191229           []  \n",
       "20                          保利桃花源  0.273168           []  \n",
       "21                温泉大道882号广州南方学院内  0.257947           []  \n",
       "22                          博学路附近  0.221662           []  \n",
       "23       温泉镇博学路882号(广州南方学院商业中心1层)  0.317505           []  \n",
       "24                  从莞深高速(广州南方学院)  0.185371           []  \n",
       "25                         广州南方学院  0.221662           []  \n",
       "26                            博学路  0.221553           []  \n",
       "27                 温泉大道882号广州南方学院  0.221662           []  \n",
       "28         温泉大道882号广州南方学院内博学路6号之3  0.216026           []  \n",
       "29                        温泉大道882  0.221662           []  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.json_normalize(r.json()['regeocode']['pois'])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "22061d92",
   "metadata": {},
   "source": [
    "天选之饭--周边--(中餐厅，外国餐厅，快餐厅，休闲餐厅)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b7b96c1c",
   "metadata": {},
   "source": [
    "## 作业：\n",
    "> 1. 尝试搜索POI2.0 接口\n",
    "> 2. 获取中餐厅、西餐厅、快餐厅的信息(图片、内容等)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "b0af8ac2",
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "regeo_url = \"https://restapi.amap.com/v5/place/text?parameters\"\n",
    "payload = {\n",
    "    \"key\":\"b62e5f7e5a9cb781d9cbd200190b6df8\",\n",
    "    \"types\":\"050100\",\n",
    "    \"show_fields\":\"business,indoor,navi,photos\",\n",
    "    \"region\":\"广州市\"\n",
    "\n",
    "}\n",
    "\n",
    "r = requests.get(url=regeo_url, params=payload) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "64e06196",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "f00b8dae",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'name': '华哥私厨-原醉琼楼',\n",
       "   'id': 'B00140H2WE',\n",
       "   'location': '113.252061,23.121695',\n",
       "   'type': '餐饮服务;中餐厅;广东菜(粤菜)',\n",
       "   'typecode': '050103',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '荔湾区',\n",
       "   'address': '光复北路443号华哥私厨-原醉琼楼',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440103',\n",
       "   'business': {'business_area': '龙津',\n",
       "    'tel': '020-81879777;13802740346',\n",
       "    'rectag': '粤菜',\n",
       "    'keytag': '粤菜',\n",
       "    'rating': '4.3',\n",
       "    'cost': '86.00',\n",
       "    'opentime_today': '11:00-21:30',\n",
       "    'opentime_week': '11:00-21:30'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'F49F011042_18102',\n",
       "    'entr_location': '113.25217,23.121667',\n",
       "    'gridcode': '3413524010'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d74ebdc4a69d848a6271af21b8de037d'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/61a5005597edd5a1c6315b24a6ee9b63'},\n",
       "    {'title': '',\n",
       "     'url': 'https://img.alicdn.com/imgextra/i1/3695320962/O1CN011IydiMcoMFThdn8_!!3695320962-0-kbcontentapng.jpg'}]},\n",
       "  {'name': '北江吃鱼专门店(美术学院店)',\n",
       "   'id': 'B00140BZBH',\n",
       "   'location': '113.279618,23.084728',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '海珠区',\n",
       "   'address': '江南大道南435号首层(江泰路地铁站C口步行260米)',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440105',\n",
       "   'business': {'business_area': '江南中',\n",
       "    'tel': '020-84428783;13632496973',\n",
       "    'rectag': '中餐',\n",
       "    'keytag': '中餐',\n",
       "    'rating': '4.8',\n",
       "    'cost': '59.00',\n",
       "    'opentime_today': '07:00-14:30 17:00-22:30',\n",
       "    'opentime_week': '07:00-14:30；17:00-22:30'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'F49F011043_45065',\n",
       "    'entr_location': '113.27957,23.084472',\n",
       "    'gridcode': '3413520201'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0d9e36c0767fe6e96841e11b7c4d9ab8'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/350d88aa47259417210b41a6911b535f'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/657a5294f530461521f58fc81017842f'}]},\n",
       "  {'name': '百花园酒家',\n",
       "   'id': 'B00140CPGP',\n",
       "   'location': '113.796488,23.310418',\n",
       "   'type': '餐饮服务;中餐厅;综合酒楼',\n",
       "   'typecode': '050101',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '增城区',\n",
       "   'address': '荔城大道百花路88号百花山庄度假村内',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440118',\n",
       "   'business': {'tel': '020-82610627',\n",
       "    'rectag': '粤菜',\n",
       "    'keytag': '粤菜',\n",
       "    'rating': '4.1'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'F49F009047_53', 'gridcode': '3413767302'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/51e40c803e93af974074931ddf8f6b54'}]},\n",
       "  {'name': '常湘聚土菜馆(横枝岗路店)',\n",
       "   'id': 'B0FFFHUVTF',\n",
       "   'location': '113.286960,23.145939',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '越秀区',\n",
       "   'address': '横枝岗56号大院旁',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440104',\n",
       "   'business': {'business_area': '登峰',\n",
       "    'tel': '020-83498683',\n",
       "    'tag': '让鸭之飞,萝卜丝鲫鱼汤,秘制烤鱼,下饭卜藕尖,灰树菌鸡汤,白辣椒炒肚尖,家乡石锅米豆腐,小炒腊牛肉,长豆角粒炒肉沫,红烧鱼块,泉水煮活鱼,五园整鸡,一品过江鱼,招牌爽滑酸菜鱼,小炒子姜鸡,新派扣肉,香煎刁子鱼,荷包蛋焖黄骨鱼,烟笋腊肠,扁豆丝炒腊肉',\n",
       "    'rectag': '农家菜',\n",
       "    'keytag': '农家菜',\n",
       "    'rating': '4.5',\n",
       "    'cost': '60.00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'F49F011043_451447', 'gridcode': '3413527212'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/914d708ea3ecc311042fb671e3dcbee7'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/29df222db6bcaf0d1f569d124c27f4a7'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/267439fc08b5a8eb704c61625813f3ef'}]},\n",
       "  {'name': '色色沙拉(中山八店)',\n",
       "   'id': 'B0FFI5OO7E',\n",
       "   'location': '113.238679,23.129955',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '荔湾区',\n",
       "   'address': '西关中兴苑小区周门街东',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440103',\n",
       "   'business': {'business_area': '西关',\n",
       "    'tel': '13826279958',\n",
       "    'rectag': '西餐',\n",
       "    'keytag': '西餐',\n",
       "    'rating': '4.5',\n",
       "    'cost': '21.00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/705ccdb538c3c1ade2b111711f3169bd'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/137ddd7f0a8970e7be34eb3bd0b3af3f'}]},\n",
       "  {'name': '兴隆食府(石牌店)',\n",
       "   'id': 'B00141RH6S',\n",
       "   'location': '113.341277,23.127523',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '天河区',\n",
       "   'address': '石牌豪居口4号1楼部位自编101单元',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440106',\n",
       "   'business': {'tel': '020-85516932',\n",
       "    'rectag': '中餐',\n",
       "    'keytag': '中餐',\n",
       "    'rating': '4.6',\n",
       "    'cost': '54.00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'F49F011043_287596', 'gridcode': '3413525700'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/153f46b66ede7829c781235ab486ac42'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/bfbfe59f2d9c008de7c5202fbf47a9a5'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/216f7bcdd0e2ca716b67a1464c41721e'}]},\n",
       "  {'name': '顺德猪世界新鲜猪什粥(大岗分店)',\n",
       "   'id': 'B00141OCC1',\n",
       "   'location': '113.401780,22.795198',\n",
       "   'type': '餐饮服务;中餐厅;广东菜(粤菜)',\n",
       "   'typecode': '050103',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '南沙区',\n",
       "   'address': '大岗镇兴业路96号阳光城市广场1层65-67号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440115',\n",
       "   'business': {'business_area': '大岗',\n",
       "    'tel': '020-34986788',\n",
       "    'rectag': '顺德菜',\n",
       "    'keytag': '顺德菜',\n",
       "    'rating': '4.4',\n",
       "    'cost': '36.00',\n",
       "    'opentime_today': '17:00-02:30',\n",
       "    'opentime_week': '17:00-02:30'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/6fba9db2dbf5471d9d3475099d746759'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/44dd59b46570d41ae797d6e3c1a9bdf4'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8d807878ca10ad5c9cb8127da9e7456f'}]},\n",
       "  {'name': '中国兰州牛肉拉面(人民北路)',\n",
       "   'id': 'B00140RXE0',\n",
       "   'location': '113.254495,23.126052',\n",
       "   'type': '餐饮服务;中餐厅;清真菜馆',\n",
       "   'typecode': '050121',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '荔湾区',\n",
       "   'address': '人民北路677号(西门口地铁站D口步行190米)',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440103',\n",
       "   'business': {'business_area': '西门口',\n",
       "    'tel': '18697229227',\n",
       "    'rectag': '拉面',\n",
       "    'keytag': '拉面',\n",
       "    'rating': '4.4',\n",
       "    'cost': '17.00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'F49F011042_853005;9871', 'gridcode': '3413525001'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a2d77d3fcec87b3feed146e35f842080'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/c7f69121765bd5b5f1cb11b22221f6e4'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/18fd43bb88ea897a418776b9546e672b'}]},\n",
       "  {'name': '太湖烧鸡(太和店)',\n",
       "   'id': 'B00140W43A',\n",
       "   'location': '113.429835,23.304969',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '白云区',\n",
       "   'address': '太和镇头陂村',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440111',\n",
       "   'business': {'rectag': '烧鸡',\n",
       "    'keytag': '烧鸡',\n",
       "    'rating': '4.4',\n",
       "    'cost': '53.00',\n",
       "    'opentime_today': '10:00-22:00',\n",
       "    'opentime_week': '10:00-22:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'F49F009044_107', 'gridcode': '3413736411'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1052e73c42c582a60ff14ad5887bd8b1'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/252ac5709c45e5c7b325191adb00de34'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/45fe116899dd6a405743bdbaf539cd1a'}]},\n",
       "  {'name': '渔家海鲜餐厅',\n",
       "   'id': 'B0FFFAHNXP',\n",
       "   'location': '113.511359,22.976139',\n",
       "   'type': '餐饮服务;中餐厅;海鲜酒楼',\n",
       "   'typecode': '050119',\n",
       "   'pname': '广东省',\n",
       "   'cityname': '广州市',\n",
       "   'adname': '番禺区',\n",
       "   'address': '石楼镇莲花山海滨路8号',\n",
       "   'pcode': '440000',\n",
       "   'citycode': '020',\n",
       "   'adcode': '440113',\n",
       "   'business': {'business_area': '石楼',\n",
       "    'tel': '020-84650830',\n",
       "    'rectag': '海鲜',\n",
       "    'keytag': '海鲜',\n",
       "    'rating': '4.6',\n",
       "    'cost': '114.00',\n",
       "    'opentime_today': '11:00-02:30',\n",
       "    'opentime_week': '11:00-02:30'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'F49F013045_4748',\n",
       "    'entr_location': '113.51128,22.975815',\n",
       "    'gridcode': '3413347002'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a1bceea2d5465db496060d31f64d89ca'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b89cf51d6ba82d0e267a75c49cd4955e'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/c447955967dadd0155ad65a30f76e67c'}]}],\n",
       " 'count': '10'}"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "640a447f",
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "regeo_url = \"https://restapi.amap.com/v5/place/text?parameters\"\n",
    "payload = {\n",
    "    \"key\":\"b62e5f7e5a9cb781d9cbd200190b6df8\",\n",
    "    \"types\":\"西餐厅\",\n",
    "    \"show_fields\":\"business,indoor,navi,photos\",\n",
    "    \"region\":\"北京市\"\n",
    "\n",
    "}\n",
    "\n",
    "r = requests.get(url=regeo_url, params=payload) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "9aa0f39a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "3983f165",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'name': '猫小院之猫镇(南锣旗舰店)',\n",
       "   'id': 'B0FFGZQ5ET',\n",
       "   'location': '116.403229,39.938866',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)|餐饮服务;冷饮店;冷饮店',\n",
       "   'typecode': '050201|050700',\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'address': '南锣鼓巷菊儿胡同20号',\n",
       "   'pcode': '110000',\n",
       "   'citycode': '010',\n",
       "   'adcode': '110101',\n",
       "   'business': {'business_area': '安定门',\n",
       "    'tel': '010-64069599',\n",
       "    'tag': '鸡腿饭,抹茶喵冰乐,咖喱鸡饭,卤肉饭,樱花荔枝蜜桃饮,猫卡布奇诺,水果茶,鳗鱼饭,黑椒牛柳意式面,水果优格,小院拿铁,咖喱牛肉,猫爪奶茶,鸡米花,藏猫猫甜点',\n",
       "    'rectag': '巴洛克风格装修',\n",
       "    'keytag': '西餐',\n",
       "    'rating': '4.7',\n",
       "    'cost': '73.00',\n",
       "    'opentime_today': '10:00-23:00',\n",
       "    'opentime_week': '10:00-23:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'J50F001020_605179', 'gridcode': '5916732210'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0151d6c9d893d7a3dde460f9e66e5eb6'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/edd40be251a57a35475d5092aec990be'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/58a26316480742e322e23d7cf97985da'}]},\n",
       "  {'name': '安妮意大利餐厅',\n",
       "   'id': 'B0FFF9ZO2U',\n",
       "   'location': '116.476445,39.912972',\n",
       "   'type': '餐饮服务;外国餐厅;意式菜品餐厅|餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050205|050201',\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '朝阳区',\n",
       "   'address': '光华路东口6号楼(近首都经济贸易大学南门,阳光100对面)',\n",
       "   'pcode': '110000',\n",
       "   'citycode': '010',\n",
       "   'adcode': '110105',\n",
       "   'business': {'business_area': '中国(北京)自由贸易试验区国际商务服务片区',\n",
       "    'tel': '010-85898366;010-85804272',\n",
       "    'tag': '奶油蘑菇汤,安妮松露披萨,提拉米苏,意大利千层面,安妮沙拉,番茄牛肉意面,凯撒沙拉,意大利肉酱千层面,木瓜鲜虾坚果沙拉,澳洲西冷牛排,海鲜安妮意粉,苹果派,意式蔬菜汤,厨师沙拉,金枪鱼斜管面',\n",
       "    'rectag': '符合大众口味',\n",
       "    'keytag': '意大利菜',\n",
       "    'rating': '4.7',\n",
       "    'cost': '92.00',\n",
       "    'opentime_today': '11:00-23:00',\n",
       "    'opentime_week': '11:00-23:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'J50F002020_353900', 'gridcode': '5916639810'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8d45c41f5f5bd083ba903481f633e4b6'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/144d817072cd3ec49c53781f7c50fc20'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2bc9a6672d8ba5273009965d8ca9a6ee'}]},\n",
       "  {'name': '猫小院(后海店)',\n",
       "   'id': 'B0FFG70DFA',\n",
       "   'location': '116.392873,39.938380',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050201',\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '西城区',\n",
       "   'address': '大金丝胡同1号(什刹海地铁站A2西北口步行340米)',\n",
       "   'pcode': '110000',\n",
       "   'citycode': '010',\n",
       "   'adcode': '110102',\n",
       "   'business': {'tel': '010-83220040',\n",
       "    'tag': '猫耳寿司,猫小圈,多样水果华夫饼,躲猫猫芒果慕斯,菠萝黄桃蜜,白猫巧克力慕斯,甜甜私房猫,卡布奇诺,猫爪奶茶,热可可,水果优格',\n",
       "    'rectag': '猫奴聚会的宝地',\n",
       "    'keytag': '创意菜',\n",
       "    'rating': '4.7',\n",
       "    'cost': '64.00',\n",
       "    'opentime_today': '09:00-22:00',\n",
       "    'opentime_week': '09:00-22:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'J50F001020_557615', 'gridcode': '5916732111'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/bb49bc9f63c3c60fa6a5a09d6255f391'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/842889d8091b8e94b42bf0b52448c819'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/189402f8dc5f6bffb7de2c317cd804e3'}]},\n",
       "  {'name': '王品牛排(亚运村新辰里店)',\n",
       "   'id': 'B000A874WV',\n",
       "   'location': '116.406815,39.991691',\n",
       "   'type': '餐饮服务;外国餐厅;牛扒店(扒房)|餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050211|050201',\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '朝阳区',\n",
       "   'address': '北辰东路8号院1号楼5层502号004',\n",
       "   'pcode': '110000',\n",
       "   'citycode': '010',\n",
       "   'adcode': '110105',\n",
       "   'business': {'business_area': '亚运村',\n",
       "    'tel': '010-84985734',\n",
       "    'tag': '王品台塑牛排,红酒鹅肝沙拉,香颂玫瑰露,法式蘑菇汤,热浓浆巧克力个拉瓦,玉米酥皮浓汤,海陆大餐,皇家牛排佐松露,小牛菲力佐,鹅肝酱色拉,金芒果慕斯,蘑菇焗烤沙拉,焦糖冰淇淋,凯撒沙拉,酥皮海鲜清汤',\n",
       "    'rectag': '西餐',\n",
       "    'keytag': '西餐',\n",
       "    'rating': '4.8',\n",
       "    'cost': '362.00',\n",
       "    'alias': '上海西提餐饮管理有限公司',\n",
       "    'opentime_today': '11:30-14:00 17:30-21:00',\n",
       "    'opentime_week': '11:30-14:00；17:30-21:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'J50F001020_426933',\n",
       "    'entr_location': '116.40696,39.992186',\n",
       "    'gridcode': '5916739201'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e914542e1f1425182e9107b9948b796c'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a7ae88386b847014cc8fe86a1c4373b7'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/121dcedd3096722e2b4b3db065ef94ec'}]},\n",
       "  {'name': '必胜客(白石桥店)',\n",
       "   'id': 'B000A8435S',\n",
       "   'location': '116.330331,39.939027',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050201',\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '海淀区',\n",
       "   'address': '中关村南大街甲56号方圆大厦1-2层',\n",
       "   'pcode': '110000',\n",
       "   'citycode': '010',\n",
       "   'adcode': '110108',\n",
       "   'business': {'business_area': '西直门',\n",
       "    'tel': '15010103212',\n",
       "    'tag': '必胜客工作日A,必胜客下午茶A,下午茶套餐A套,下午茶A',\n",
       "    'rectag': '西餐',\n",
       "    'keytag': '西餐',\n",
       "    'rating': '4.8',\n",
       "    'cost': '71.00',\n",
       "    'opentime_today': '07:30-21:30',\n",
       "    'opentime_week': '07:30-21:30'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'J50F001019_37665',\n",
       "    'entr_location': '116.330233,39.938929',\n",
       "    'gridcode': '5916722621'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a4367c31edc9567bc8beb95ff5bb4e10'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d1c21adf5c2b3a7474f3a349b6bc3baa'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e4a3529d90c13ef7e3b497b395348ebd'}]},\n",
       "  {'name': '文府大厨',\n",
       "   'id': 'B000A810IR',\n",
       "   'location': '116.370533,39.909479',\n",
       "   'type': '餐饮服务;外国餐厅;法式菜品餐厅|餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050204|050201',\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '西城区',\n",
       "   'address': '华远街15-2号(西单地铁站F1西北口步行410米)',\n",
       "   'pcode': '110000',\n",
       "   'citycode': '010',\n",
       "   'adcode': '110102',\n",
       "   'business': {'business_area': '西单',\n",
       "    'tel': '010-58518811;010-58518059',\n",
       "    'tag': '鳕鱼,菲力牛排,刺身拼盘,鹅肝碎炒饭,烤生蚝,鳗鱼虾卷,盐烤虾,松茸蘑菇汤,芝士蛋糕,烤鳗鱼,鹅肝,三文鱼炒饭,火焰香蕉,西瓜汁,紫苏叶海鲜鱼籽炒饭,炒饭,牛排,烤扇贝,烤大虾,牛舌',\n",
       "    'rectag': '铁板烧',\n",
       "    'keytag': '铁板烧',\n",
       "    'rating': '4.8',\n",
       "    'cost': '317.00',\n",
       "    'opentime_today': '10:30-14:00 17:00-21:30 10:30-14:30 17:00-21:30',\n",
       "    'opentime_week': '周一至周五10:30-14:00；17:00-21:30；周末及节假日10:30-14:30；17:00-21:30'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'J50F002019_30117', 'gridcode': '5916629901'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8e7c42b7882fc8f5eff7e09851bfc330'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e17c5851aa1efe8e8e63cbb36a881bbf'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/befeb16636b21885f0f54bf79d2e27f8'}]},\n",
       "  {'name': '将太无二(金泉广场餐厅)',\n",
       "   'id': 'B000A85GE0',\n",
       "   'location': '116.411328,40.005968',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)|餐饮服务;外国餐厅;日本料理',\n",
       "   'typecode': '050201|050202',\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '朝阳区',\n",
       "   'address': '大屯里312号金泉广场F栋1层(近北苑路)',\n",
       "   'pcode': '110000',\n",
       "   'citycode': '010',\n",
       "   'adcode': '110105',\n",
       "   'business': {'business_area': '北辰',\n",
       "    'tel': '010-84855800;010-84855900',\n",
       "    'tag': '秋天的童话,烧汁牛肉饭,烧汁鸡肉丸子饭,照烧鸡排饭,炸鸡块,味付三拼,奶酪鸡蛋卷,慕斯三拼,盐烤大虾,札幌味增拉面,将太豪华大卷,铁板鲍鱼配扇贝,赤贝刺身,飞跃cbd,芝士焗扇贝',\n",
       "    'rectag': '寿司',\n",
       "    'keytag': '寿司',\n",
       "    'rating': '4.8',\n",
       "    'cost': '132.00',\n",
       "    'opentime_today': '11:00-22:00',\n",
       "    'opentime_week': '11:00-22:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'K50F048020_215948',\n",
       "    'entr_location': '116.411404,40.006095',\n",
       "    'gridcode': '6016030222'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8d6b8c57ad556721121e14d95098de89'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/aaaaa98a437dd9d2e2406220c583e5b6'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/c4a5101fcc87c34e8d3f657f2ce3145a'}]},\n",
       "  {'name': '子水(麦子店街)',\n",
       "   'id': 'B000A83SNB',\n",
       "   'location': '116.477123,39.948901',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050201',\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '朝阳区',\n",
       "   'address': '朝阳公园6号蓝色港湾国际商区',\n",
       "   'pcode': '110000',\n",
       "   'citycode': '010',\n",
       "   'adcode': '110105',\n",
       "   'business': {'business_area': '姚家园',\n",
       "    'tel': '010-50956009;010-59056008',\n",
       "    'rectag': '西餐',\n",
       "    'keytag': '西餐',\n",
       "    'rating': '3.6'},\n",
       "   'indoor': {'indoor_map': '1',\n",
       "    'cpid': 'GD0000100210100157_B000A83SNB',\n",
       "    'floor': 'B000A83SNB'}},\n",
       "  {'name': '芒果西餐',\n",
       "   'id': 'B000A8VYKV',\n",
       "   'location': '116.441847,39.917547',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050201',\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '朝阳区',\n",
       "   'address': '日坛北路6号',\n",
       "   'pcode': '110000',\n",
       "   'citycode': '010',\n",
       "   'adcode': '110105',\n",
       "   'business': {'business_area': '建国门',\n",
       "    'tel': '010-85613685;010-85633686',\n",
       "    'rectag': '西餐',\n",
       "    'keytag': '西餐',\n",
       "    'rating': '4.9',\n",
       "    'cost': '154.00',\n",
       "    'opentime_today': '10:00-03:00',\n",
       "    'opentime_week': '10:00-03:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'J50F002020_329117', 'gridcode': '5916730501'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e2e431a812bfc4e934aaca445c9baebd'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/5d447738179cece3b40c6e5f402184cb'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e54de26b39c2e9a4747c53122acc819d'}]},\n",
       "  {'name': '白夜西餐',\n",
       "   'id': 'B000A1BCE1',\n",
       "   'location': '116.428563,39.943361',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'typecode': '050201',\n",
       "   'pname': '北京市',\n",
       "   'cityname': '北京市',\n",
       "   'adname': '东城区',\n",
       "   'address': '东直门内北中街甲13号',\n",
       "   'pcode': '110000',\n",
       "   'citycode': '010',\n",
       "   'adcode': '110101',\n",
       "   'business': {'business_area': '东直门',\n",
       "    'tel': '010-84029595',\n",
       "    'rectag': '俄国菜',\n",
       "    'keytag': '俄国菜',\n",
       "    'rating': '4.6',\n",
       "    'cost': '99.00',\n",
       "    'opentime_today': '11:00-24:00',\n",
       "    'opentime_week': '11:00-24:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'J50F001020_7928', 'gridcode': '5916733400'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/160e29d8f19d949c42622890ad59d165'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0f70dd1f6285a89f2da402eee563d2d6'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/26ac756c299671f21caf0f80e5717bbe'}]}],\n",
       " 'count': '10'}"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "d66f01f6",
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "regeo_url = \"https://restapi.amap.com/v5/place/text?parameters\"\n",
    "payload = {\n",
    "    \"key\":\"b62e5f7e5a9cb781d9cbd200190b6df8\",\n",
    "    \"keywords\":\"快餐厅\",\n",
    "    \"show_fields\":\"business,indoor,navi,photos\",\n",
    "    \"region\":\"泉州市\"\n",
    "\n",
    "}\n",
    "\n",
    "r = requests.get(url=regeo_url, params=payload) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "ff22586a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "e572b0cd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'name': '重庆鸡公煲(师院三餐店)',\n",
       "   'id': 'B0HAUSRDPC',\n",
       "   'location': '118.669463,24.870947',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'typecode': '050100',\n",
       "   'pname': '福建省',\n",
       "   'cityname': '泉州市',\n",
       "   'adname': '丰泽区',\n",
       "   'address': '东海大街398号泉州师范学院第三食堂3楼13号',\n",
       "   'pcode': '350000',\n",
       "   'citycode': '0595',\n",
       "   'adcode': '350503',\n",
       "   'business': {'tel': '13055505407',\n",
       "    'rectag': '中餐',\n",
       "    'keytag': '中餐',\n",
       "    'opentime_today': '10:00-19:30',\n",
       "    'opentime_week': '每天10:00-19:30'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0137237eed4525cf7a1bcaf50724707e'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/6fbc09f8eb56a01fbfccd517d008328b'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8349a507248c6e6d1ff48336c20ed63f'}]},\n",
       "  {'name': '豪潤大鷄排(柯厝路店)',\n",
       "   'id': 'B0FFFW39F5',\n",
       "   'location': '118.669011,24.871882',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'typecode': '050300',\n",
       "   'pname': '福建省',\n",
       "   'cityname': '泉州市',\n",
       "   'adname': '丰泽区',\n",
       "   'address': '',\n",
       "   'pcode': '350000',\n",
       "   'citycode': '0595',\n",
       "   'adcode': '350503',\n",
       "   'business': {'rectag': '小吃快餐',\n",
       "    'keytag': '小吃快餐',\n",
       "    'cost': '31.00',\n",
       "    'opentime_today': '10:00-23:00',\n",
       "    'opentime_week': '10:00-23:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/430586bfc49939886e55b795cf9883de'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/03709e635cefb5b52367153b701eefc8'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/070efd26d0ef43ea9bcdc5d1b6e698dc'}]},\n",
       "  {'name': '贝克汉堡(泉州丰泽区)',\n",
       "   'id': 'B0FFK0B9JH',\n",
       "   'location': '118.667888,24.868661',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'pname': '福建省',\n",
       "   'cityname': '泉州市',\n",
       "   'adname': '丰泽区',\n",
       "   'address': '泉州师范学院东海校区第二食堂',\n",
       "   'pcode': '350000',\n",
       "   'citycode': '0595',\n",
       "   'adcode': '350503',\n",
       "   'business': {'tel': '0595-22886917',\n",
       "    'tag': '冰皮麻薯慕斯酸奶味,芝士鸡排堡,腿堡+香辣鸡腿+中可,蜂蜜手扒鸡+中可,奥尔良熊手堡,招牌摇摇奶茶,红豆,椰果,3Q果,奥尔良堡板堡,墨西哥鸡肉卷+小可,奶茶烧仙草',\n",
       "    'rectag': '食堂',\n",
       "    'keytag': '食堂',\n",
       "    'rating': '4.0',\n",
       "    'cost': '22.00',\n",
       "    'opentime_today': '10:00-23:30',\n",
       "    'opentime_week': '每天10:00-23:30'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/aeba788cdf2894e88b09b1748892616c'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/f5038be98f159a5b1ff8d42580d47e55'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2ef798d23207048805edc6b123baa958'}]},\n",
       "  {'name': '正新鸡排(泉州师大店)',\n",
       "   'id': 'B0FFHRT4ZF',\n",
       "   'location': '118.668641,24.871102',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'typecode': '050300',\n",
       "   'pname': '福建省',\n",
       "   'cityname': '泉州市',\n",
       "   'adname': '丰泽区',\n",
       "   'address': '柯厝路23号10号店',\n",
       "   'pcode': '350000',\n",
       "   'citycode': '0595',\n",
       "   'adcode': '350503',\n",
       "   'business': {'tel': '15158533162',\n",
       "    'rectag': '小吃快餐',\n",
       "    'keytag': '小吃快餐',\n",
       "    'rating': '4.0',\n",
       "    'cost': '11.00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1eadd1a82262d64d10b0b2c4fb88bb45'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/515acc5dac4c4694e03495d52b75f993'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/54ec936fa0d31f2cd6d42c440914204f'}]},\n",
       "  {'name': '麦当劳(泉州东海路餐厅)',\n",
       "   'id': 'B0FFFS4DB5',\n",
       "   'location': '118.654041,24.871402',\n",
       "   'type': '餐饮服务;快餐厅;麦当劳',\n",
       "   'typecode': '050302',\n",
       "   'pname': '福建省',\n",
       "   'cityname': '泉州市',\n",
       "   'adname': '丰泽区',\n",
       "   'address': '东海大街新华都生活广场广场1层',\n",
       "   'pcode': '350000',\n",
       "   'citycode': '0595',\n",
       "   'adcode': '350503',\n",
       "   'business': {'tel': '0595-22938188',\n",
       "    'rectag': '西式快餐',\n",
       "    'keytag': '西式快餐',\n",
       "    'rating': '4.4',\n",
       "    'cost': '30.00',\n",
       "    'opentime_today': '07:00-24:00',\n",
       "    'opentime_week': '07:00-24:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'navi': {'navi_poiid': 'G50F038038_10641', 'gridcode': '3718254210'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/50923116ffd64664efd03b861d97d06d'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0b7b2d2ada04dbeb45b89fa775a66ebf'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/02a9c69137077c0e0eafacc237656e00'}]},\n",
       "  {'name': '杨记重庆小面',\n",
       "   'id': 'B0FFMGE3XS',\n",
       "   'location': '118.683552,24.870131',\n",
       "   'type': '餐饮服务;中餐厅;四川菜(川菜)',\n",
       "   'typecode': '050102',\n",
       "   'pname': '福建省',\n",
       "   'cityname': '泉州市',\n",
       "   'adname': '丰泽区',\n",
       "   'address': '东海街道北星社区北星街18号',\n",
       "   'pcode': '350000',\n",
       "   'citycode': '0595',\n",
       "   'adcode': '350503',\n",
       "   'business': {'tel': '13505009190',\n",
       "    'rectag': '川菜',\n",
       "    'keytag': '川菜',\n",
       "    'rating': '3.6',\n",
       "    'opentime_today': '07:00-21:00',\n",
       "    'opentime_week': '07:00-21:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/bff480afd66d5669c74803683f2fc31f'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0ab950f9f164fb37a6efe89502e2d7d7'}]},\n",
       "  {'name': '李记潮汕汤粉面(师院三餐店)',\n",
       "   'id': 'B0HROCMIEH',\n",
       "   'location': '118.669503,24.870961',\n",
       "   'type': '餐饮服务;中餐厅;潮州菜',\n",
       "   'typecode': '050123',\n",
       "   'pname': '福建省',\n",
       "   'cityname': '泉州市',\n",
       "   'adname': '丰泽区',\n",
       "   'address': '东海大街398号泉州师范学院第三食堂3楼5号',\n",
       "   'pcode': '350000',\n",
       "   'citycode': '0595',\n",
       "   'adcode': '350503',\n",
       "   'business': {'rectag': '米粉', 'keytag': '米粉'},\n",
       "   'indoor': {'indoor_map': '0'}},\n",
       "  {'name': '肯德基',\n",
       "   'id': 'B0IGUC0159',\n",
       "   'location': '118.654535,24.872352',\n",
       "   'type': '餐饮服务;快餐厅;肯德基',\n",
       "   'typecode': '050301',\n",
       "   'pname': '福建省',\n",
       "   'cityname': '泉州市',\n",
       "   'adname': '丰泽区',\n",
       "   'address': '东海大街与培英路交叉口西北120米',\n",
       "   'pcode': '350000',\n",
       "   'citycode': '0595',\n",
       "   'adcode': '350503',\n",
       "   'business': {'rectag': '西式快餐', 'keytag': '西式快餐', 'rating': '4.1'},\n",
       "   'indoor': {'indoor_map': '0'}},\n",
       "  {'name': '快乐番薯(东海湾店)',\n",
       "   'id': 'B0FFG9OTIL',\n",
       "   'location': '118.653589,24.871369',\n",
       "   'type': '餐饮服务;冷饮店;冷饮店',\n",
       "   'typecode': '050700',\n",
       "   'pname': '福建省',\n",
       "   'cityname': '泉州市',\n",
       "   'adname': '丰泽区',\n",
       "   'address': '东海大街太古广场新华都超市负一层F-117号',\n",
       "   'pcode': '350000',\n",
       "   'citycode': '0595',\n",
       "   'adcode': '350503',\n",
       "   'business': {'tel': '0595-68319609',\n",
       "    'rectag': '奶茶/茶饮',\n",
       "    'keytag': '奶茶/茶饮',\n",
       "    'rating': '4.2',\n",
       "    'cost': '6.00',\n",
       "    'opentime_today': '10:00-22:00',\n",
       "    'opentime_week': '10:00-22:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/db77b81d97b578366fd29ef87077bcca'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/18f78847a491aaed22200a54dada810d'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b197d9ef9ad8b7c5ab86a14b1fb7fc89'}]},\n",
       "  {'name': '广东肠粉(师范店)',\n",
       "   'id': 'B0FFGMQ7LR',\n",
       "   'location': '118.668600,24.871029',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'typecode': '050000',\n",
       "   'pname': '福建省',\n",
       "   'cityname': '泉州市',\n",
       "   'adname': '丰泽区',\n",
       "   'address': '柯厝路23号',\n",
       "   'pcode': '350000',\n",
       "   'citycode': '0595',\n",
       "   'adcode': '350503',\n",
       "   'business': {'rectag': '小吃快餐',\n",
       "    'keytag': '小吃快餐',\n",
       "    'cost': '12.00',\n",
       "    'opentime_today': '10:00-02:00',\n",
       "    'opentime_week': '10:00-02:00'},\n",
       "   'indoor': {'indoor_map': '0'},\n",
       "   'photos': [{'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b907ad9f24dcea46dd545afc96a5158f'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d2d7005197cd87f43baff0c3bfa8745d'},\n",
       "    {'title': '',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/ddae4890956c63cc877b1a925215c8e9'}]}],\n",
       " 'count': '10'}"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bd2086b5",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
